<!--
 * @Author: your name
 * @Date: 2021-01-06 16:33:26
 * @LastEditTime: 2021-01-26 15:13:31
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \solaxcloud\src\views\test\frame\nowData.vue
-->
<template>
    <div class="frame-nowData-mian-box">
        <el-form ref="form" :model="form" label-width="200px" >
            <el-row :gutter="20" >
                <el-col :span="8" :offset="3">
                    <el-form-item :label="$t('report.reportAnalys.js_report_idc1')" prop="idc1" :rules="[{ required: false, message: $t('index_js_notNull')}]">
                        <el-input v-model="form.idc1" :placeholder="$t('pleaseInput')" :disabled="true"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="8" :offset="1">
                    <el-form-item :label="$t('report.reportAnalys.js_report_idc2')" prop="idc2" :rules="[{ required: false, message: $t('index_js_notNull')}]">
                        <el-input v-model="form.idc2" :placeholder="$t('pleaseInput')" :disabled="true"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="8" :offset="3">
                    <el-form-item :label="$t('report.reportAnalys.js_report_vdc1')" prop="vdc1" :rules="[{ required: false, message: $t('index_js_notNull')}]">
                        <el-input v-model="form.vdc1" :placeholder="$t('pleaseInput')" :disabled="true"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="8" :offset="1">
                    <el-form-item :label="$t('report.reportAnalys.js_report_vdc2')" prop="vdc2" :rules="[{ required: false, message: $t('index_js_notNull')}]">
                        <el-input v-model="form.vdc2" :placeholder="$t('pleaseInput')" :disabled="true"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="8" :offset="3">
                    <el-form-item :label="$t('report.reportAnalys.js_report_single_iac1')" prop="iac1" :rules="[{ required: false, message: $t('index_js_notNull')}]">
                        <el-input v-model="form.iac1" :placeholder="$t('pleaseInput')" :disabled="true"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="8" :offset="1">
                    <el-form-item :label="$t('report.reportAnalys.js_report_single_vac1')" prop="vac1" :rules="[{ required: false, message: $t('index_js_notNull')}]">
                        <el-input v-model="form.vac1" :placeholder="$t('pleaseInput')" :disabled="true"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="8" :offset="3">
                    <el-form-item :label="$t('report.reportAnalys.js_report_yieldtoday')" prop="todayYield" :rules="[{ required: false, message: $t('index_js_notNull')}]">
                        <el-input v-model="form.todayYield" :placeholder="$t('pleaseInput')" :disabled="true"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="8" :offset="1">
                    <el-form-item :label="$t('test.deviceTest.real_time.totalYield')" prop="totalYield" :rules="[{ required: false, message: $t('index_js_notNull')}]">
                        <el-input v-model="form.totalYield" :placeholder="$t('pleaseInput')" :disabled="true"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="8" :offset="3">
                    <el-form-item :label="$t('test.deviceTest.real_time.powerdc1')" prop="powerdc1" :rules="[{ required: false, message: $t('index_js_notNull')}]">
                        <el-input v-model="form.powerdc1" :placeholder="$t('pleaseInput')" :disabled="true"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="8" :offset="1">
                    <el-form-item :label="$t('test.deviceTest.real_time.powerdc2')" prop="powerdc2" :rules="[{ required: false, message: $t('index_js_notNull')}]">
                        <el-input v-model="form.powerdc2" :placeholder="$t('pleaseInput')" :disabled="true"></el-input>
                    </el-form-item>
                </el-col>

                <el-col :span="8" :offset="3">
                    <el-form-item :label="$t('test.deviceTest.real_time.gridPower')" prop="gridPower" :rules="[{ required: false, message: $t('index_js_notNull')}]">
                        <el-input v-model="form.gridPower" :placeholder="$t('pleaseInput')" :disabled="true"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="8" :offset="1">
                    <el-form-item :label="$t('test.deviceTest.real_time.feedInPower')" prop="feedInPower" :rules="[{ required: false, message: $t('index_js_notNull')}]">
                        <el-input v-model="form.feedInPower" :placeholder="$t('pleaseInput')" :disabled="true"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="8" :offset="3">
                    <el-form-item :label="$t('test.deviceTest.real_time.feedInEnergy')" prop="feedInEnergy" :rules="[{ required: false, message: $t('index_js_notNull')}]">
                        <el-input v-model="form.feedInEnergy" :placeholder="$t('pleaseInput')" :disabled="true"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="8" :offset="1">
                    <el-form-item :label="$t('test.deviceTest.real_time.consumeEnergy')" prop="consumeEnergy" :rules="[{ required: false, message: $t('index_js_notNull')}]">
                        <el-input v-model="form.consumeEnergy" :placeholder="$t('pleaseInput')" :disabled="true"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="8" :offset="3">
                    <el-form-item :label="$t('test.deviceTest.real_time.iccid')" prop="iccid" :rules="[{ required: false, message: $t('index_js_notNull')}]">
                        <el-input v-model="form.iccid" :placeholder="$t('pleaseInput')" :disabled="true"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="8" :offset="1">
                    <el-form-item :label="$t('test.deviceTest.reflashTime')" prop="reflashTime" :rules="[{ required: false, message: $t('index_js_notNull')}]">
                        <el-input v-model="form.reflashTime" :placeholder="$t('pleaseInput')" :disabled="true"></el-input>
                    </el-form-item>
                </el-col>
                
            </el-row>
        </el-form>
    </div>
</template>

<script>
export default {
    components: {

    },
    props: {

    },
    data() {
        return {
            form:{
                idc1:'',
                idc2:'',
                vdc1:'',
                vdc2:'',
                iac1:'',
                vac1:'',
                todayYield:'',
                totalYield:'',
                powerdc1:'',
                powerdc2:'',
                gridPower:'',
                feedInPower:'',
                feedInEnergy:'',
                consumeEnergy:'',
                iccid:'',
                reflashTime:'',
            }
        };
    },
    computed: {

    },
    watch: {

    },
    created() {

    },
    mounted() {
        this.deviceTestGetTestByWifiSN()
    },
    methods: {
        async deviceTestGetTestByWifiSN(){
            let res = await this.API.deviceTestGetTestByWifiSN({
                wifiSN:this.$route.query.wifiSN
            })
            this.form.idc1 = res.idc1 + 'A'
            this.form.idc2 = res.idc2 + 'A'
            this.form.vdc1 = res.vdc1 + 'V'
            this.form.vdc2 = res.vdc2 + 'V'
            this.form.iac1 = res.iac1 + 'A'
            this.form.vac1 = res.vac1 + 'V'
            this.form.todayYield = res.todayYield + 'kWh'
            this.form.totalYield = res.totalYield + 'kWh'
            this.form.powerdc1 = res.powerdc1 + 'kW'
            this.form.powerdc2 = res.powerdc2 + 'kW'
            this.form.gridPower = res.gridPower + 'kW'
            this.form.feedInPower = res.feedInPower + 'kW'
            this.form.feedInEnergy = res.feedInEnergy + 'kWh'
            this.form.consumeEnergy = res.consumeEnergy + 'kWh'
            this.form.iccid = res.iccid 
            this.form.reflashTime = res.reflashTime 
        }
    },
};
</script>

<style  lang="less" scoped>

</style>
